package com.neuedu.jxcboot.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.neuedu.jxcboot.common.bean.Pager;
import com.neuedu.jxcboot.mapper.BaseMapper;
import com.neuedu.jxcboot.service.BaseService;





/**
 * 默认业务实现类，提供默认的实现方法 ;  其它业务功能都需要继承该类进行功能编写！
 * 
 * @author chens
 *
 * @param <T>
 */

public abstract class DefaultServiceImpl<T> implements BaseService<T> {
	
	@Autowired
	private BaseMapper<T> baseMapper;

	@Override
	public List<T> list(Pager<T> pager) {

		return baseMapper.list(pager);
	}

	@Override
	public Integer count(Pager<T> pager) {

		return baseMapper.count(pager);
	}

	@Override
	public boolean add(T object) {
		return baseMapper.add(object);
	}

	@Override
	public boolean edit(T object) {
		return baseMapper.edit(object);
	}

	@Override
	public boolean deleteByIds(List<T> ids) {
		return baseMapper.deleteByIds(ids);
	}


}
